package leetcode_2401_2500;

public class LeeCode_2439 {
    public static void main(String[] args) {

    }

    private static int minimizeArrayValue(int[] nums) {
        long max = 0, sum = 0;
        for (int i = 0; i < nums.length; i++) {
            sum += nums[i];
            max = Math.max(max, (sum + i) / (i + 1));
        }
        return (int) max;
    }
}
